﻿<Window x:Class="News.Windows.ClassicNews"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Properties="clr-namespace:News.Properties"
        Height="410" Width="320" WindowStyle="None" ResizeMode="NoResize" AllowsTransparency="True" Background="Transparent"
        SourceInitialized="WindowSourceInitialized" Loaded="WindowLoaded" MouseMove="WindowMouseMove" MouseLeftButtonUp="WindowMouseLeftButtonUp" MouseEnter="ThisMouseEnter" MouseLeave="ThisMouseLeave">
    <Window.RenderTransform>
        <ScaleTransform x:Name="Scale" ScaleX="1" ScaleY="{Binding ElementName=Scale, Path=ScaleX}"/>
    </Window.RenderTransform>
    <Window.Resources>
        <Storyboard x:Key="MouseEnter">
            <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.3" FillBehavior="Stop" Completed="MouseEnterCompleted"/>
        </Storyboard>
        <Storyboard x:Key="MouseLeave">
            <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.3" FillBehavior="Stop" Completed="MouseLeaveCompleted"/>
        </Storyboard>
    </Window.Resources>
    <Window.ContextMenu>
        <ContextMenu>
            <MenuItem Name="RefreshItem" Header="{x:Static Properties:Resources.RefreshItem}" Click="RefreshItemClick"/>
            <MenuItem Name="ClearItem" Header="{x:Static Properties:Resources.ClearItem}" Click="ClearItemClick"/>
            <Separator/>
            <MenuItem Name="PinItem" Header="{x:Static Properties:Resources.Pin}" IsCheckable="True" Click="PinItemClick"/>
            <MenuItem Name="TopMostItem" Header="{x:Static Properties:Resources.TopMost}" IsCheckable="True" Click="TopMostItemClick"/>
            <MenuItem Name="OptionsItem" Header="{x:Static Properties:Resources.OptionsItem}" Click="OptionsItemClick"/>
            <MenuItem Name="CloseItem" Header="{x:Static Properties:Resources.CloseItem}" Click="CloseItemClick"/>
        </ContextMenu>
    </Window.ContextMenu>
    <Window.TaskbarItemInfo>
        <TaskbarItemInfo />
    </Window.TaskbarItemInfo>
    <Grid Margin="0,15,0,0">
        <Rectangle RadiusX="10" RadiusY="10" Stroke="#717171" Opacity="0.7">
            <Rectangle.Fill>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Color="#666666" Offset="0"/>
                    <GradientStop Color="#212121" Offset="0.7"/>
                    <GradientStop Color="#212121" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <ListBox Name="NewsList" BorderThickness="0" Margin="0,45,0,20" Background="Transparent" HorizontalContentAlignment="Stretch" ScrollViewer.CanContentScroll="False"
                 ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.PanningMode="VerticalOnly">
            <ListBox.Style>
                <Style>
                    <Style.Resources>
                        <!-- Background of selected item when focussed -->
                        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
                        <!-- Background of selected item when not focussed -->
                        <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
                    </Style.Resources>
                </Style>
            </ListBox.Style>
        </ListBox>
        <Image Source="/Resources/header.png" VerticalAlignment="Top"/>
        <Image Source="/Resources/icon_news.png" VerticalAlignment="Top" HorizontalAlignment="Left" Width="102" Height="67" Margin="10,-15,0,0"/>
        <TextBlock Text="{x:Static Properties:Resources.Title}" VerticalAlignment="Top" HorizontalAlignment="Left" Foreground="White" FontSize="20" Margin="110,8,0,0"/>
        <Image Source="/Resources/footer.png" VerticalAlignment="Bottom"/>
        <StackPanel Name="RefreshStatusPanel" Orientation="Horizontal" Margin="0,0,0,2" HorizontalAlignment="Center" VerticalAlignment="Bottom" Cursor="Hand" MouseLeftButtonUp="RefreshStatusPanelMouseLeftButtonUp">
            <Image Name="RefreshIcon" Source="/Resources/refresh.png" Height="14" RenderOptions.BitmapScalingMode="HighQuality" VerticalAlignment="Center"/>
            <TextBlock Name="RefreshTime" Text="12:02" FontSize="14" VerticalAlignment="Center" Foreground="White" Margin="3,0,0,0"/>
        </StackPanel>
    </Grid>
</Window>
